<?php
class Resource_Zfdebug extends Zend_Application_Resource_ResourceAbstract
{
    public function init()
    {
        $autoloader = Zend_Loader_Autoloader::getInstance();
        $autoloader->registerNamespace('ZFDebug');


        $dbAdapter = $this->getBootstrap()->getResource('Db');


        $options = array(
            'plugins' => array('Variables',
                               'Database' => array('adapter' => $dbAdapter ),
                               'File' => array('basePath' => '/path/to/project'),
                               'Memory',
                               'Time',
                               'Registry',
                               //'Cache' => null,//array('backend' => $cache->getBackend()),
                               'Exception')
        );
        $debug = new ZFDebug_Controller_Plugin_Debug($options);
//echo 'aina';
        //$this->bootstrap('frontController');
        $frontController = $this->getBootstrap()->frontController;

        //$frontController = $this->getResource('frontController');
        $frontController->registerPlugin($debug);

    }
}
